﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using Sport_Shop.DAL;

namespace Sport_Shop
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                load_page();

        }

        private void load_page()
        {
            DataAccess da = new DataAccess();
            string sql = "SELECT HinhAnh, TenSP, DonGia FROM SanPham";
            dlSanpham.DataSource = da.GetDataList(sql).Tables[0];
            dlSanpham.DataBind();
            
        }

    }
}